class TestModel {
  List<TestModelData> _data;
  TestModel({List<TestModelData> data}) {
    this._data = data;
  }
  List<TestModelData> get data => _data;
  set data(List<TestModelData> data) => _data = data;

  TestModel.fromJson(Map<String, dynamic> json) {
    if (json['data'] != null) {
      _data = new List<TestModelData>();
      json['data'].forEach((v) {
        _data.add(new TestModelData.fromJson(v));
      });
    }
  }
  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this._data != null) {
      data['data'] = this._data.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class TestModelData {
  double _test;

  TestModelData({double test}) {
    this._test = test;
  }

  double get test => _test;
  set test(double test) => _test = test;

  TestModelData.fromJson(Map<String, dynamic> json) {
    _test = json['test'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['test'] = this._test;
    return data;
  }
}
